package com.zhouyer.study.service.feign;

import com.zhouyer.study.service.fallback.CodeFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 验证码服务feign本地接口
 *
 * @author zhouyao
 * @version 1.0
 * @date 2021/12/7 12:00 下午
 */
@FeignClient(value = "zhouyer-service-code", fallback = CodeFeignClientFallback.class, path = "/code")
public interface CodeFeignClient {
    /**
     * 验证邮箱地址及验证码
     *
     * @param email 邮箱地址
     * @param code  验证码
     * @return java.lang.Integer
     */
    @GetMapping("/validate/{email}/{code}")
    public Integer validateCode(@PathVariable("email") String email, @PathVariable("code") String code);
}
